package com.REPDPMSystem.Service;

import com.REPDPMSystem.Entity.MyFile;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface FileService extends IService<MyFile> {
    boolean upLoad(MyFile myfile, MultipartFile multipartFile) throws IOException;
    void downLoad(HttpServletResponse response, String filePath);
    List<MyFile> getFileByFolderId(String folderId);
    List<MyFile> getFileInfoByName(String name,String folder_id);
    int createNewFileInFolder(MyFile file);
    boolean deleteFileByFileId(String fileId);
    boolean deleteFileByFolderId(String folderId);
    long countUploadedFilesByEmployeeAndTimePeriod(String employeeId, long startTime, long endTime);
    List<MyFile> getUploadedFilesByEmployeeAndTimePeriod(String employeeId, long startTime, long endTime);
}
